#include"searcher.hpp"
#include<cstdio>
#include<cstring>
#include<iostream>
#include<string>


const std::string input  = "data/raw_html/raw.txt";

int mian()
{
    ns_sercher::Searcher *search = new ns_sercher::Searcher();
    search->InitSearchar(input);

    std::string query;
    std::string  Json_string;
    char buffer[1024];
    while(true)
    {
        std::cout<<"Please Enter You Search Query# ";
        fgets(buffer,sizeof(buffer)-1,stdin);
        buffer[strlen(buffer)-1] = 0;
        query = buffer;
        search->Search(query,&Json_string);
        std::cout<<Json_string <<std::endl;
    }
    return 0;
}